/**
 * The MIT License (MIT)
 * Copyright (c) 2020 铭软科技(mingsoft.net)
 * Permission is hereby granted, free of charge, to any person obtaining a copy of
 * this software and associated documentation files (the "Software"), to deal in
 * the Software without restriction, including without limitation the rights to
 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
 * the Software, and to permit persons to whom the Software is furnished to do so,
 * subject to the following conditions:

 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.

 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */
package cn.stylefeng.qz.business.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 分类实体
 */
@Data
@TableName("cms_category")
public class Category {

    private static final long serialVersionUID = 1574925152750L;


    @TableId(value = "id", type = IdType.AUTO)
    private String id;
    /**
     * 所属栏目
     */
    @TableField(insertStrategy = FieldStrategy.NOT_EMPTY, updateStrategy = FieldStrategy.NOT_EMPTY, whereStrategy = FieldStrategy.NOT_EMPTY)
    private String categoryId;


    /**
     * 叶子节点
     */
    private Boolean leaf;
    /**
     * 顶级id
     */
    private String topId;
    /**
     * 字典对应编号
     */
    private Integer dictId;
    /**
     * 栏目管理的内容模型id
     */
    private Integer mdiyModelId;


    /**
     * 父类型编号
     */
    private String categoryParentIds;

    /**
     * 栏目管理名称
     */
    private String categoryTitle;
    /**
     * 缩略图
     */
    private String categoryImg;

    /**
     * 栏目属性
     */
    private String categoryFlag;
    /**
     * 栏目管理描述
     */
    private String categoryDescrip;
    /**
     * 栏目管理关键字
     */
    private String categoryKeyword;

    /**
     * 栏目路径
     */
    private String categoryPath;
    /**
     * 自定义链接
     */
    private String categoryDiyUrl;
    /**
     * 内容模板
     */
    private String categoryUrl;
    /**
     * 列表模板
     */
    private String categoryListUrl;
    /**
     * 栏目管理属性
     */
    private String categoryType;
    /**
     * 栏目别名
     */
    private String categoryPinyin;
    /**
     * 类别发布时间
     */
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date categoryDatetime;
    /**
     * 自定义顺序
     */
    private Integer categorySort;

    /**
     * 修改时间
     */
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateDate;

    /**
     * 修改人
     */
    private Integer updateBy;
    /**
     * 创建时间
     */
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createDate;

    /**
     * 创建人
     */
    private Integer createBy;
    /**
     * 创建人
     */
    private Boolean deleteFlag;


}
